{template 'common/header'}
<ul class="nav nav-tabs">
    <li>
        <a href="{php echo $this->createWebUrl('region', array('op' => 'list','id' => $id));}">返回</a>
    </li>
    <li class="active">
        <a href="{php echo $this->createWebUrl('region', array('op' => 'rlist','id' => $id));}">查看房号</a>
    </li>
</ul>
<div class="panel panel-info">
    <div class="panel-heading">筛选</div>
    <div class="panel-body">
        <form action="" method="post" class="form-horizontal" role="form">
            <div class="form-group">
                <label class="col-xs-12 col-sm-2 col-md-2 control-label">房号</label>
                <div class="col-sm-8 col-md-8 col-lg-8 col-xs-12">
                    <input class="form-control" name="keyword" id="" type="text" value="{$_GPC['keyword']}">
                </div>
            </div>
            <div class="form-group">
                <div class="pull-right col-xs-12 col-sm-2 col-md-2 col-lg-2">
                    <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                </div>
            </div>
        </form>
    </div>
</div>
<form action="" class="form-horizontal form" method="post" enctype="multipart/form-data">
    <div style="padding:15px;">
        <table class="table table-hover table-condensed">
            <thead class="navbar-inner">
                <tr>
                    <th style="width:30px;">删？</th>
                    <th style="width:5%;">ID</th>
                    <th style="width:12%;">房号</th>
                    <th style="width:12%;">注册码</th>
                    <th style="width:15%;">联系电话</th>
                    <th style="width:30%;">操作</th>
                </tr>
            </thead>
            <tbody>
                {loop $list $item}
                <tr>
                    <td style="width:30px;">
                        <input type="checkbox" name="rid[]" value="{$item['id']}">
                    </td>
                    <td>{$item['id']}</td>
                    <td>{$item['room']}</td>
                    <td>{$item['code']}</td>
                    <td>{$item['mobile']}</td>
                    <td>
                        <a href="{php echo $this->createWebUrl('region',array('op' => 'room','rid' => $item['id']))}" title="" data-toggle="tooltip" data-placement="top" class="btn btn-default btn-sm"><i class="glyphicon glyphicon-download-alt"></i>导出房号</a>
                        <a href="{php echo $this->createWebUrl('region',array('op' => 'edit','rid' => $item['id'],'id' => $id))}" title="编辑" class="btn btn-default btn-sm"><i class="fa fa-edit" data-toggle="tooltip" data-placement="top"></i>编辑</a>
                    </td>
                </tr>
                {/loop}
            </tbody>
        </table>
        {if $list}
        <table class="table table-hover">
            <tr>
                <td width="30">
                    <input type="checkbox" onclick="var ck = this.checked;$(':checkbox').each(function(){this.checked = ck});" />
                </td>
                <td class="text-left">
                    <input name="token" type="hidden" value="{$_W['token']}" />
                    <input type="submit" class="btn btn-primary span2" name="delete" value="删除" /> &nbsp;
                    <a class="btn btn-default btn-sm" href="javascript:;" data-toggle="modal" data-target="#room_{$id}"><i class='glyphicon glyphicon-plus'></i>添加房号</a>
                </td>
            </tr>
        </table>
        {/if} {$pager}
    </div>
</form>
<!-- Modal -->
<div class="modal fade" id="room_{$id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">添加房号</h4>
            </div>
            <form action="" class="form-horizontal form" method="post" enctype="multipart/form-data" onsubmit="return check(this);">
                <div class="panel panel-default">
                    <!-- <div class="panel-heading">
                        <h3 class="panel-title">房号信息</h3>
                    </div> -->
                    <div class="panel-body">
                        <div class="form-group">
                            <label for="room" class="col-sm-2 control-label">房号名称</label>
                            <div class="col-xs-5">
                                <input type='text' name='room' id='room' class="form-control" placeholder="请输入房号信息" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="" class="col-sm-2 control-label">手机号码</label>
                            <div class="col-sm-5">
                                <input type='text' name='mobile' id='mobile' class="form-control" placeholder="请输入手机号码" />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="" class="col-sm-2 control-label"></label>
                            <div class="col-sm-10">
                                <button type="submit" class="btn btn-primary span3" name="submit" value="提交">提交</button>
                                <input type="hidden" name="token" value="{$_W['token']}" />
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{template 'common/footer'}
